import $ from 'jquery';
global.$ = global.jQuery = $;
require('tcplayer.js/dist/libs/hls.min.1.1.6');
import 'tcplayer.js/dist/tcplayer.min.css';
import {uploadVideo,vodPlay} from "./../../js/vod/tengxunyun/vod";
import axios from 'axios';
import { showMsg } from './../../js/base/utils';

(function ($) {
    uploadVideo($, appId, courseName, "uploadVideo", "videoFileId", 60, admin_api_glob_tengxunyunSignatureDo, admin_api_glob_tengxunyunVodAndvancePlaySignDo);
    if (vodStatus) {
    axios
        .get(admin_api_glob_tengxunyunVodAndvancePlaySignDo + "?videoId=" + videoId)
        .then(function (response) {
            if (response.data.code != 200) {
                return showMsg(400, response.data.message);
            }
            var token = response.data.data;

            var videostr =
                '<video id="vreview"  width="400" height="250" preload="meta" playsinline webkit-playsinline></video>';
            $("#vodDiv").html(videostr);
            vodPlay("vreview", videoId, appId, token);
            $("#vreview").show();
            $("#vodDiv").show();
        });
    }
})(jQuery);
